new radio buttons. handle inconsistent state for check- and radiobuttons.
authorSoeren Sandmann <sandmann@daimi.au.dk>
Wed, 20 Feb 2002 22:09:25 +0000 (22:09 +0000)
committerSøren Sandmann Pedersen <ssp@src.gnome.org>
Wed, 20 Feb 2002 22:09:25 +0000 (22:09 +0000)
Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

* gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
check- and radiobuttons.

* gtk/theme-bits/check-13-inconsistent.png,
gtk/theme-bits/radio-13-inconsistent.png: new files

* gtk/theme-bits/radio-13.png: new radio buttons

* gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
-inconsistent.png files

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkstyle.c
gtk/theme-bits/Makefile.am
gtk/theme-bits/check-13-inconsistent.png [new file with mode: 0644]
gtk/theme-bits/radio-13-inconsistent.png [new file with mode: 0644]
gtk/theme-bits/radio-13.png

index 5a886548a05d0c702e185ec1e16f45a8b3e05b04..09a9224417b13ffc5fadd73e35e5aa1a49ca17ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
+       check- and radiobuttons.
+
+       * gtk/theme-bits/check-13-inconsistent.png,
+       gtk/theme-bits/radio-13-inconsistent.png: new files
+
+       * gtk/theme-bits/radio-13.png: new radio buttons
+
+       * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
+       -inconsistent.png files
+
 Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
index 5a886548a05d0c702e185ec1e16f45a8b3e05b04..09a9224417b13ffc5fadd73e35e5aa1a49ca17ca 100644 (file)
@@ -1,3 +1,16 @@
+Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
+       check- and radiobuttons.
+
+       * gtk/theme-bits/check-13-inconsistent.png,
+       gtk/theme-bits/radio-13-inconsistent.png: new files
+
+       * gtk/theme-bits/radio-13.png: new radio buttons
+
+       * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
+       -inconsistent.png files
+
 Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
index 5a886548a05d0c702e185ec1e16f45a8b3e05b04..09a9224417b13ffc5fadd73e35e5aa1a49ca17ca 100644 (file)
@@ -1,3 +1,16 @@
+Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
+       check- and radiobuttons.
+
+       * gtk/theme-bits/check-13-inconsistent.png,
+       gtk/theme-bits/radio-13-inconsistent.png: new files
+
+       * gtk/theme-bits/radio-13.png: new radio buttons
+
+       * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
+       -inconsistent.png files
+
 Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
index 5a886548a05d0c702e185ec1e16f45a8b3e05b04..09a9224417b13ffc5fadd73e35e5aa1a49ca17ca 100644 (file)
@@ -1,3 +1,16 @@
+Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
+       check- and radiobuttons.
+
+       * gtk/theme-bits/check-13-inconsistent.png,
+       gtk/theme-bits/radio-13-inconsistent.png: new files
+
+       * gtk/theme-bits/radio-13.png: new radio buttons
+
+       * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
+       -inconsistent.png files
+
 Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
index 5a886548a05d0c702e185ec1e16f45a8b3e05b04..09a9224417b13ffc5fadd73e35e5aa1a49ca17ca 100644 (file)
@@ -1,3 +1,16 @@
+Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
+       check- and radiobuttons.
+
+       * gtk/theme-bits/check-13-inconsistent.png,
+       gtk/theme-bits/radio-13-inconsistent.png: new files
+
+       * gtk/theme-bits/radio-13.png: new radio buttons
+
+       * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
+       -inconsistent.png files
+
 Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
index 5a886548a05d0c702e185ec1e16f45a8b3e05b04..09a9224417b13ffc5fadd73e35e5aa1a49ca17ca 100644 (file)
@@ -1,3 +1,16 @@
+Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
+       check- and radiobuttons.
+
+       * gtk/theme-bits/check-13-inconsistent.png,
+       gtk/theme-bits/radio-13-inconsistent.png: new files
+
+       * gtk/theme-bits/radio-13.png: new radio buttons
+
+       * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
+       -inconsistent.png files
+
 Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
index 5a886548a05d0c702e185ec1e16f45a8b3e05b04..09a9224417b13ffc5fadd73e35e5aa1a49ca17ca 100644 (file)
@@ -1,3 +1,16 @@
+Wed Feb 20 23:00:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkstyle.c: new radio buttons. handle inconsistent state for
+       check- and radiobuttons.
+
+       * gtk/theme-bits/check-13-inconsistent.png,
+       gtk/theme-bits/radio-13-inconsistent.png: new files
+
+       * gtk/theme-bits/radio-13.png: new radio buttons
+
+       * gtk/theme-bits/Makefile.am (EXTRA_DIST): add new
+       -inconsistent.png files
+
 Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
index fa81482e65cd02d39676e2ad9c6b9f5804f68f0e..8b190d697dcd11ebc87dff8ee23fffb3648506da 100644 (file)
@@ -330,53 +330,86 @@ typedef enum {
   CHECK_LIGHT,
   CHECK_MID,
   CHECK_TEXT,
+  CHECK_INCONSISTENT_AA,
+  CHECK_INCONSISTENT_TEXT,
   RADIO_BASE,
   RADIO_BLACK,
   RADIO_DARK,
   RADIO_LIGHT,
   RADIO_MID,
-  RADIO_TEXT
+  RADIO_TEXT,
+  RADIO_INCONSISTENT_AA,
+  RADIO_INCONSISTENT_TEXT
 } IndicatorPart;
 
-static char check_aa_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x58,0x00,0xa0,
- 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-static char check_base_bits[] = {
- 0x00,0x00,0x00,0x00,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,
- 0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0x00,0x00,0x00,0x00};
+/*
+ * Extracted from check-13.png, width=13, height=13
+ */
 static char check_black_bits[] = {
- 0x00,0x00,0xfe,0x0f,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,
0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00};
 0x00,0x00,0xfe,0x0f,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,
 0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00};
 static char check_dark_bits[] = {
- 0xff,0x1f,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
- 0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
-static char check_light_bits[] = {
- 0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,
- 0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xfe,0x1f};
+  0xff,0x1f,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
+  0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00};
 static char check_mid_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,
- 0x08,0x00,0x08,0x00,0x08,0x00,0x08,0xfc,0x0f,0x00,0x00};
+  0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,
+  0x08,0x00,0x08,0x00,0x08,0x00,0x08,0xfc,0x0f,0x00,0x00,0x00,0x00};
+static char check_light_bits[] = {
+  0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,
+  0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xfe,0x1f,0x00,0x00};
 static char check_text_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x80,0x01,0x80,0x00,0xd8,
- 0x00,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-static char radio_base_bits[] = {
- 0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,
- 0x07,0xfc,0x07,0xf8,0x03,0xf0,0x01,0x00,0x00,0x00,0x00};
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x80,0x01,0x80,0x00,0x58,
+  0x00,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+static char check_aa_bits[] = {
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x58,0x00,0xa0,
+  0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+static char check_base_bits[] = {
+  0x00,0x00,0x00,0x00,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,
+  0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0x00,0x00,0x00,0x00,0x00,0x00};
+
+/*
+ * Extracted from check-13-inconsistent-ssp.png, width=13, height=13
+ */
+static char check_inconsistent_text_bits[] = {
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x03,0xf8,
+  0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+static char check_inconsistent_aa_bits[] = {
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+
+/*
+ * Extracted from radio-13-ssp.png, width=13, height=13
+ */
 static char radio_black_bits[] = {
0x00,0x00,0xf0,0x01,0x08,0x02,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,
0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
 0x00,0x00,0xf0,0x01,0x0c,0x02,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,
 0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
 static char radio_dark_bits[] = {
- 0xf0,0x01,0x08,0x02,0x04,0x04,0x02,0x04,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
- 0x00,0x01,0x00,0x02,0x00,0x0c,0x00,0x00,0x00,0x00,0x00};
-static char radio_light_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,0x10,0x00,0x10,0x00,
- 0x10,0x00,0x10,0x00,0x08,0x00,0x04,0x08,0x02,0xf0,0x01};
+  0xf0,0x00,0x0c,0x02,0x02,0x04,0x02,0x04,0x01,0x08,0x01,0x08,0x01,0x08,0x01,
+  0x08,0x00,0x04,0x02,0x04,0x0c,0x03,0xf0,0x00,0x00,0x00,0x00,0x00};
 static char radio_mid_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,
- 0x08,0x00,0x08,0x00,0x04,0x00,0x02,0xf0,0x01,0x00,0x00};
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+static char radio_light_bits[] = {
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,
+  0x10,0x00,0x08,0x00,0x08,0x00,0x04,0x00,0x03,0xf0,0x00,0x00,0x00};
 static char radio_text_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0,
- 0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0,
+  0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+static char radio_aa_bits[] = {
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+static char radio_base_bits[] = {
+  0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,
+  0x07,0xfc,0x03,0xf8,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+/*
+ * Extracted from radio-13-inconsistent-ssp.png, width=13, height=13
+ */
+static char radio_inconsistent_text_bits[] = {
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x03,0x00,
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+static char radio_inconsistent_aa_bits[] = {
+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x03,0x00,0x00,0xf8,
+  0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
 
 static struct {
   char      *bits;
@@ -389,12 +422,16 @@ static struct {
   { check_light_bits, NULL },
   { check_mid_bits, NULL },
   { check_text_bits, NULL },
+  { check_inconsistent_aa_bits, NULL },
+  { check_inconsistent_text_bits, NULL },
   { radio_base_bits, NULL },
   { radio_black_bits, NULL },
   { radio_dark_bits, NULL },
   { radio_light_bits, NULL },
   { radio_mid_bits, NULL },
-  { radio_text_bits, NULL }
+  { radio_text_bits, NULL },
+  { radio_inconsistent_aa_bits, NULL },
+  { radio_inconsistent_text_bits, NULL },
 };
 
 /* --- variables --- */
@@ -3301,20 +3338,35 @@ gtk_default_draw_check (GtkStyle      *style,
              draw_part (window, style->black_gc, area, x, y, CHECK_TEXT);
              draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_AA);
            }
+         else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */
+           {
+             draw_part (window, style->black_gc, area, x, y, CHECK_INCONSISTENT_TEXT);
+             draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_INCONSISTENT_AA);
+           }
        }
       else
        {
+         GdkGC *base_gc = style->base_gc[state_type];
+
+         if (state_type == GTK_STATE_ACTIVE)
+           base_gc = style->bg_gc[state_type];
+         
+         draw_part (window, base_gc, area, x, y, CHECK_BASE);
          draw_part (window, style->black_gc, area, x, y, CHECK_BLACK);
          draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_DARK);
          draw_part (window, style->mid_gc[state_type], area, x, y, CHECK_MID);
          draw_part (window, style->light_gc[state_type], area, x, y, CHECK_LIGHT);
-         draw_part (window, style->base_gc[state_type], area, x, y, CHECK_BASE);
          
          if (shadow_type == GTK_SHADOW_IN)
            {
              draw_part (window, style->text_gc[state_type], area, x, y, CHECK_TEXT);
              draw_part (window, style->text_aa_gc[state_type], area, x, y, CHECK_AA);
            }
+         else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */
+           {
+             draw_part (window, style->text_gc[state_type], area, x, y, CHECK_INCONSISTENT_TEXT);
+             draw_part (window, style->text_aa_gc[state_type], area, x, y, CHECK_INCONSISTENT_AA);
+           }
        }
     }
 
@@ -3363,18 +3415,37 @@ gtk_default_draw_option (GtkStyle      *style,
       if (strcmp (detail, "option") == 0)      /* Menu item */
        {
          if (shadow_type == GTK_SHADOW_IN)
-           draw_part (window, style->fg_gc[state_type], area, x, y, RADIO_TEXT);
+           {
+             draw_part (window, style->fg_gc[state_type], area, x, y, RADIO_TEXT);
+           }
+         else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */
+           {
+             draw_part (window, style->black_gc, area, x, y, CHECK_INCONSISTENT_TEXT);
+             draw_part (window, style->dark_gc[state_type], area, x, y, CHECK_INCONSISTENT_AA);
+           }
        }
       else
        {
+         GdkGC *base_gc = style->base_gc[state_type];
+
+         if (state_type == GTK_STATE_ACTIVE)
+           base_gc = style->bg_gc[state_type];
+
+         draw_part (window, base_gc, area, x, y, RADIO_BASE);
          draw_part (window, style->black_gc, area, x, y, RADIO_BLACK);
          draw_part (window, style->dark_gc[state_type], area, x, y, RADIO_DARK);
          draw_part (window, style->mid_gc[state_type], area, x, y, RADIO_MID);
          draw_part (window, style->light_gc[state_type], area, x, y, RADIO_LIGHT);
-         draw_part (window, style->base_gc[state_type], area, x, y, RADIO_BASE);
          
          if (shadow_type == GTK_SHADOW_IN)
-           draw_part (window, style->text_gc[state_type], area, x, y, RADIO_TEXT);
+           {
+             draw_part (window, style->text_gc[state_type], area, x, y, RADIO_TEXT);
+           }
+         else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */
+           {
+             draw_part (window, style->text_aa_gc[state_type], area, x, y, RADIO_INCONSISTENT_AA);
+             draw_part (window, style->text_gc[state_type], area, x, y, RADIO_INCONSISTENT_TEXT);
+           }
        }
     }
 }
index 47cd0b023b88106906065d5c253728097d0e9a25..05b7cdd31fcc94326b4676da7814c910443e0e6d 100644 (file)
@@ -8,4 +8,4 @@ noinst_PROGRAMS = decompose-bits
 decompose_bits_SOURCES = decompose-bits.c
 decompose_bits_LDADD = $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la
 
-EXTRA_DIST = check-13.png radio-13.png
+EXTRA_DIST = check-13.png check-13-inconsistent radio-13.png radio-13-inconsistent
diff --git a/gtk/theme-bits/check-13-inconsistent.png b/gtk/theme-bits/check-13-inconsistent.png
new file mode 100644 (file)
index 0000000..3b27dc5
Binary files /dev/null and b/gtk/theme-bits/check-13-inconsistent.png differ
diff --git a/gtk/theme-bits/radio-13-inconsistent.png b/gtk/theme-bits/radio-13-inconsistent.png
new file mode 100644 (file)
index 0000000..b049432
Binary files /dev/null and b/gtk/theme-bits/radio-13-inconsistent.png differ
index 410fd50a1e309ec5ff5d50a95546b9500c9e513c..710f87e16b055a054662ace125a238ea6da4e951 100644 (file)
Binary files a/gtk/theme-bits/radio-13.png and b/gtk/theme-bits/radio-13.png differ